package Eyjafjalla.card.dolly;

import Eyjafjalla.action.EyjafjallaAttackAction;
import Eyjafjalla.action.StarAction;
import Eyjafjalla.card.AbstractEyjafjallaCard;
import Eyjafjalla.modcore.ColorEnum;
import com.megacrit.cardcrawl.actions.common.HealAction;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.cards.DamageInfo;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.localization.CardStrings;
import com.megacrit.cardcrawl.monsters.AbstractMonster;

public class XSS_Eyjafjalla extends AbstractEyjafjallaCard {
    public static final String ID = "XSS_Eyjafjalla";
    private static final CardStrings cardStrings;

    boolean extraDamage = false;

    public XSS_Eyjafjalla(){
        super(ID, cardStrings.NAME,2,cardStrings.DESCRIPTION,CardType.ATTACK, ColorEnum.Eyjafjalla_Dolly_COLOR,CardRarity.UNCOMMON,CardTarget.ENEMY);
        this.baseDamage = 36;
        this.damage =36;
        this.baseMagicNumber = 18;
        this.magicNumber = 18;
        setDolly();
        setFireDescription(cardStrings.EXTENDED_DESCRIPTION[0]);
    }

    @Override
    public AbstractCard makeCopy() {
        return new XSS_Eyjafjalla();
    }

    @Override
    public void use(AbstractPlayer p, AbstractMonster m) {
        addToBot(new EyjafjallaAttackAction());
        if(isFire())
            addToBot(new HealAction(p,p,5));
        addToBot(new StarAction(m,new DamageInfo(p,damage,damageTypeForTurn),this.magicNumber));
    }

    @Override
    public void upgrade() {
        if(!this.upgraded){
            upgradeName();
            upgradeMagicNumber(-10);
        }
    }

    static {
        cardStrings = CardCrawlGame.languagePack.getCardStrings(ID);
    }
}



